#include "hikari.h"

HikariContext::HikariContext(IrrlichtDevice*device,HikariEventReceiver*input){
	this->device=device;
	this->input=input;
	driver=device->getVideoDriver();
	sceneManager=device->getSceneManager();
	animationManager=new AnimationManager();
	scriptManager=new ScriptManager();
	guiManager=device->getGUIEnvironment();
}

void HikariContext::removeUpdateableObject(HObj*object){
	for(std::list<HObj*>::iterator i=updateableObjects.begin();i!=updateableObjects.end();i++){
		HObj* value=*i;
		if(value==object){
			i=updateableObjects.erase(i);
			return;
		}
	}
}

bool HikariContext::isUpdateableObjectExist(HObj*object){
	for(std::list<HObj*>::iterator i=updateableObjects.begin();i!=updateableObjects.end();i++){
		HObj* value=*i;
		if(value==object){
			return true;
		}
	}

	return false;
}